-- GENERATED SPELL FOR [Shattered Hand Berserker] --


function spell0_16878(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(35570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16878', 2293, 1)
end

function spell1_16878(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_16878', 598, 1)
end

function spell2_16878(pUnit, Event) --@Soul Burden,n/a--
pUnit:FullCastSpellOnTarget(38879,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16878', 597, 1)
end

function Sorts_16878(pUnit, Event)
local choix_sorts_16878 = math.random(0, 2)
if choix_sorts_16878 == 0 then
pUnit:RegisterEvent('spell0_16878', 1, 1)
end
if choix_sorts_16878 == 1 then
pUnit:RegisterEvent('spell1_16878', 1, 1)
end
if choix_sorts_16878 == 2 then
pUnit:RegisterEvent('spell2_16878', 1, 1)
end
end

function mob16878_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16878', math.random(1500, 3000), 1)
end

function mob16878_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16878_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16878_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16878, 1, 'mob16878_Action')
RegisterUnitEvent(16878, 2, 'mob16878_Leave')
RegisterUnitEvent(16878, 3, 'mob16878_Kill')
RegisterUnitEvent(16878, 4, 'mob16878_Die')
